<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<c:set var="base" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>书签列表</title>
</head>
<body>
<div class="row">
    <div class="col-lg-10"><h3><a href="${base}/bookmark?m=createFolder">创建</a></h3></div>
</div>
<div class="row">
    <c:forEach items="${page.content}" var="folder">
        <div class="col-lg-10">
            <h2>${folder.name}</h2>

            <p class="text-danger">
                <a href="${base}/bookmark?m=delete&id=${folder.id}">删除</a>
                <a href="${base}/bookmark?m=toUpdate&id=${folder.id}">编辑</a>
            </p>
        </div>
    </c:forEach>
    <nav>
        <ul class="pagination">
            <li>
                <a href="bookmark?method=list&pageNumber=${page.number-1}" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li>
                <span aria-hidden="true">当前页：${page.number} &nbsp; &nbsp;总页数： ${page.totalPages} </span>
            </li>
            <li>
                <a href="bookmark?m=list&pageNumber=${page.number+1}" aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
        </ul>
    </nav>
</div>
</body>
</html>
